import { defineStore } from "pinia"
import { register } from "@/api";
import {ElMessage} from "element-plus";

export const useRegisterStore = defineStore('register', {
    state() {
        return {
            registerData:null
        }

    },
    getters: {
            getRegisterData(){
                return this.registerData
            }
    },
    actions: {
        register(data,callfunc){
            register(data).then((res)=>{
                this.registerData = res.data.data
                callfunc(res.data)
                console.log("aa", res)
            })
        }
    }

})

